home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Begin VB.Form frmPlanes
- BackColor = &H80000009&
- BorderStyle = 0 'None
- Caption = "Form1"
- ClientHeight = 7200
- ClientLeft = 0
- ClientTop = 0
- ClientWidth = 11085
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 7200
- ScaleWidth = 11085
- ShowInTaskbar = 0 'False
- StartUpPosition = 3 'Windows Default
- WindowState = 2 'Maximized
- Begin VB.CommandButton cmdQuit
- Caption = "&Quit"
- Height = 375
- Left = 10080
- TabIndex = 3
- Top = 6840
- Width = 975
- End
- Begin VB.ComboBox cboDirection
- Height = 315
- ItemData = "13-3-1.frx":0000
- Left = 10080
- List = "13-3-1.frx":000D
- TabIndex = 2
- Text = "Right"
- Top = 5640
- Width = 975
- End
- Begin VB.CommandButton cmdDropBomb
- Caption = "&Drop Bomb"
- Height = 375
- Left = 10080
- TabIndex = 1
- Top = 6360
- Width = 975
- End
- Begin VB.CommandButton cmdMove
- Caption = "&Move"
- Height = 375
- Left = 10080
- TabIndex = 0
- Top = 5160
- Width = 975
- End
- Begin VB.Image imgPlanePic
- Height = 1335
- Left = 5520
- Picture = "13-3-1.frx":0022
- Stretch = -1 'True
- Top = 3480
- Width = 1815
- End
- Begin VB.Image imgBombPic
- Height = 480
- Left = 600
- Picture = "13-3-1.frx":10060
- Stretch = -1 'True
- Top = 2280
- Visible = 0 'False
- Width = 1080
- End
- Begin VB.Image imgBomberPic
- Height = 1800
- Left = 120
- Picture = "13-3-1.frx":10D22
- Stretch = -1 'True
- Top = 120
- Width = 2520
- End
- Attribute VB_Name = "frmPlanes"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Private bomber As CPlane
- Private plane As CPlane
- Private WithEvents bomb As CBomb
- Attribute bomb.VB_VarHelpID = -1
- Private Sub Form_Load()
- Set bomber = New CPlane
- Set plane = New CPlane
- Set bomb = New CBomb
- bomber.imagePlane = imgBomberPic
- plane.imagePlane = imgPlanePic
- bomb.imageBomb = imgBombPic
- End Sub
- Private Sub bomb_BombPositionChanged(X As Integer, Y As Integer, H As Integer, W As Integer)
- 'Check to see if Plane is hit, i.e. the bomb is inside plane or vice versa.
- If plane.Present() Then
- If (plane.X <= X) And (plane.X + plane.W >= X) And _
- (plane.Y <= Y) And (plane.Y + plane.H >= Y) Or _
- (X <= plane.X) And (X + W >= plane.X) And _
- (Y <= plane.Y) And (Y + H >= plane.Y) Then
- plane.Destroy
- bomb.Destroy
- End If
- End If
- End Sub
- Private Sub cmdMove_Click()
- bomber.Fly cboDirection.Text, frmPlanes.Height, frmPlanes.Width
- End Sub
- Private Sub cmdDropBomb_Click()
- bomb.GoDown bomber, frmPlanes.Height
- End Sub
- Private Sub cmdQuit_Click()
- End
- End Sub
-